/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package GUI;

import DAO.Fechas;
import DAO.garantiasDAO;
import DTO.ComprobanteGeneralDTO;
import DTO.garantiaCdpOtrosDTO;
import DTO.usuarioDTO;
import java.awt.Desktop;
import java.io.File;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JFileChooser;
import javax.swing.JFrame;
import javax.swing.JOptionPane;
import javax.swing.table.DefaultTableModel;
import net.sf.jasperreports.engine.JRException;
import net.sf.jasperreports.engine.JasperCompileManager;
import net.sf.jasperreports.engine.JasperFillManager;
import net.sf.jasperreports.engine.JasperPrint;
import net.sf.jasperreports.engine.JasperReport;
import net.sf.jasperreports.engine.data.JRBeanCollectionDataSource;
import net.sf.jasperreports.swing.JRViewer;

/**
 *
 * @author Luis Olave 10
 */
public class EliminacionGarantiaCdp extends javax.swing.JFrame {
    usuarioDTO user;
    garantiasDAO reg = new garantiasDAO();
    garantiaCdpOtrosDTO garantia;
    
    public EliminacionGarantiaCdp(usuarioDTO user) {
        this.user = user;
        initComponents();
        this.btnEliminarCDP.setVisible(false);
        chkBuscarFolioCDP.setSelected(true);
        pnlBuscarNumero.setVisible(false);
        this.setDefaultCloseOperation(this.EXIT_ON_CLOSE);
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        buttonGroup1 = new javax.swing.ButtonGroup();
        jLabel2 = new javax.swing.JLabel();
        jLabel1 = new javax.swing.JLabel();
        jTabbedPane1 = new javax.swing.JTabbedPane();
        jPanel1 = new javax.swing.JPanel();
        btnMnuPrincipalEliCDP = new javax.swing.JButton();
        pnlDatosPersoGara = new javax.swing.JPanel();
        jPanel8 = new javax.swing.JPanel();
        jLabel36 = new javax.swing.JLabel();
        jLabel37 = new javax.swing.JLabel();
        jLabel39 = new javax.swing.JLabel();
        jLabel40 = new javax.swing.JLabel();
        txtEliNombreCDP = new javax.swing.JTextField();
        txtApellMatEliCDP = new javax.swing.JTextField();
        txtApellPatEliCDP = new javax.swing.JTextField();
        txtRutEliCDP = new javax.swing.JTextField();
        chkBuscarFolioCDP = new javax.swing.JCheckBox();
        chkBuscarNumeroCDP = new javax.swing.JCheckBox();
        pnlBuscarNumero = new javax.swing.JPanel();
        jLabel30 = new javax.swing.JLabel();
        txtBuscarNumeroCDP = new javax.swing.JTextField();
        btnBuscarNumeroCDP = new javax.swing.JButton();
        pnlBuscarFolio = new javax.swing.JPanel();
        jLabel31 = new javax.swing.JLabel();
        txtBuscarFolioCDP = new javax.swing.JTextField();
        btnBuscarFolioCDP = new javax.swing.JButton();
        jPanel2 = new javax.swing.JPanel();
        pnlDescripGarantia = new javax.swing.JPanel();
        jScrollPane4 = new javax.swing.JScrollPane();
        txtDescripcionCDP = new javax.swing.JTextArea();
        lblDescripcion = new javax.swing.JLabel();
        jPanel3 = new javax.swing.JPanel();
        jPanel4 = new javax.swing.JPanel();
        jPanel5 = new javax.swing.JPanel();
        jLabel4 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        jLabel13 = new javax.swing.JLabel();
        jLabel12 = new javax.swing.JLabel();
        jLabel11 = new javax.swing.JLabel();
        txtFechUltTasaCDP = new javax.swing.JTextField();
        txtFechModCDP = new javax.swing.JTextField();
        txtMonedaCDP = new javax.swing.JTextField();
        txtFechUltDebCDP = new javax.swing.JTextField();
        txtFechCreaCDP = new javax.swing.JTextField();
        txtSucCDP = new javax.swing.JTextField();
        jLabel14 = new javax.swing.JLabel();
        txtEliminacionNumeroCD = new javax.swing.JTextField();
        jPanel6 = new javax.swing.JPanel();
        jLabel7 = new javax.swing.JLabel();
        jLabel8 = new javax.swing.JLabel();
        jLabel9 = new javax.swing.JLabel();
        jLabel10 = new javax.swing.JLabel();
        txtFechExtCDP = new javax.swing.JTextField();
        txtTipoGtiaCDP = new javax.swing.JTextField();
        txtFechUltRevalCDP = new javax.swing.JTextField();
        txtFechUltCCDP = new javax.swing.JTextField();
        jPanel12 = new javax.swing.JPanel();
        lblArchivo = new javax.swing.JLabel();
        btnVerArchivCDP = new javax.swing.JButton();
        btnMenuPCDP = new javax.swing.JButton();
        btnEliminarCDP = new javax.swing.JButton();
        jPanel7 = new javax.swing.JPanel();
        jPanel9 = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        tbSalidaImprimirCdp = new javax.swing.JTable();
        btnImprimirCdp = new javax.swing.JButton();
        btnMenuPrincipalCdp = new javax.swing.JButton();
        jPanel10 = new javax.swing.JPanel();
        txtBuscarCdpImprimirEliminar = new javax.swing.JTextField();
        btnBuscarCdpEliminacionImprimir = new javax.swing.JButton();
        jLabel3 = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("ELIMINACIÓN GARANTÍA CDP");
        setResizable(false);

        jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/IMAGE/logo.JPG"))); // NOI18N

        jLabel1.setFont(new java.awt.Font("Century Gothic", 1, 18)); // NOI18N
        jLabel1.setText("ELIMINACIÓN GARANTÍA CDP");

        jTabbedPane1.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N

        btnMnuPrincipalEliCDP.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        btnMnuPrincipalEliCDP.setText("MENÚ PRINCIPAL");
        btnMnuPrincipalEliCDP.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnMnuPrincipalEliCDPActionPerformed(evt);
            }
        });

        pnlDatosPersoGara.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "DATOS PERSONALES GARANTE", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        jLabel36.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel36.setText("RUT");

        jLabel37.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel37.setText("APELLIDO PATERNO");

        jLabel39.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel39.setText("APELLIDO MATERNO");

        jLabel40.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel40.setText("NOMBRE");

        txtEliNombreCDP.setBackground(new java.awt.Color(255, 255, 102));
        txtEliNombreCDP.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtEliNombreCDP.setEnabled(false);

        txtApellMatEliCDP.setBackground(new java.awt.Color(255, 255, 102));
        txtApellMatEliCDP.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtApellMatEliCDP.setEnabled(false);

        txtApellPatEliCDP.setBackground(new java.awt.Color(255, 255, 102));
        txtApellPatEliCDP.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtApellPatEliCDP.setEnabled(false);

        txtRutEliCDP.setBackground(new java.awt.Color(255, 255, 102));
        txtRutEliCDP.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtRutEliCDP.setEnabled(false);

        javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8);
        jPanel8.setLayout(jPanel8Layout);
        jPanel8Layout.setHorizontalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel8Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel37)
                    .addComponent(jLabel36))
                .addGap(18, 18, 18)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(txtRutEliCDP, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtApellPatEliCDP, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 81, Short.MAX_VALUE)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel39)
                    .addComponent(jLabel40))
                .addGap(18, 18, 18)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(txtEliNombreCDP, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtApellMatEliCDP, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(196, 196, 196))
        );
        jPanel8Layout.setVerticalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel8Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel36)
                    .addComponent(txtRutEliCDP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel40)
                    .addComponent(txtEliNombreCDP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel37)
                    .addComponent(txtApellPatEliCDP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel39)
                    .addComponent(txtApellMatEliCDP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        javax.swing.GroupLayout pnlDatosPersoGaraLayout = new javax.swing.GroupLayout(pnlDatosPersoGara);
        pnlDatosPersoGara.setLayout(pnlDatosPersoGaraLayout);
        pnlDatosPersoGaraLayout.setHorizontalGroup(
            pnlDatosPersoGaraLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlDatosPersoGaraLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        pnlDatosPersoGaraLayout.setVerticalGroup(
            pnlDatosPersoGaraLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlDatosPersoGaraLayout.createSequentialGroup()
                .addGap(0, 0, Short.MAX_VALUE)
                .addComponent(jPanel8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
        );

        buttonGroup1.add(chkBuscarFolioCDP);
        chkBuscarFolioCDP.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        chkBuscarFolioCDP.setText("BUSCAR POR N° FOLIO");
        chkBuscarFolioCDP.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                chkBuscarFolioCDPActionPerformed(evt);
            }
        });

        buttonGroup1.add(chkBuscarNumeroCDP);
        chkBuscarNumeroCDP.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        chkBuscarNumeroCDP.setText("BUSCAR POR NÚMERO");
        chkBuscarNumeroCDP.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                chkBuscarNumeroCDPActionPerformed(evt);
            }
        });

        pnlBuscarNumero.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "INGRESE N°", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        jLabel30.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel30.setText("NÚMERO CDP");

        btnBuscarNumeroCDP.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        btnBuscarNumeroCDP.setText("BUSCAR");
        btnBuscarNumeroCDP.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnBuscarNumeroCDPActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout pnlBuscarNumeroLayout = new javax.swing.GroupLayout(pnlBuscarNumero);
        pnlBuscarNumero.setLayout(pnlBuscarNumeroLayout);
        pnlBuscarNumeroLayout.setHorizontalGroup(
            pnlBuscarNumeroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlBuscarNumeroLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel30)
                .addGap(18, 18, 18)
                .addGroup(pnlBuscarNumeroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(txtBuscarNumeroCDP)
                    .addComponent(btnBuscarNumeroCDP, javax.swing.GroupLayout.DEFAULT_SIZE, 100, Short.MAX_VALUE))
                .addContainerGap(52, Short.MAX_VALUE))
        );
        pnlBuscarNumeroLayout.setVerticalGroup(
            pnlBuscarNumeroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlBuscarNumeroLayout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(pnlBuscarNumeroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel30)
                    .addComponent(txtBuscarNumeroCDP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnBuscarNumeroCDP)
                .addContainerGap())
        );

        pnlBuscarFolio.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "INGRESE N° FOLIO", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        jLabel31.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel31.setText("N° FOLIO");

        btnBuscarFolioCDP.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        btnBuscarFolioCDP.setText("BUSCAR");
        btnBuscarFolioCDP.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnBuscarFolioCDPActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout pnlBuscarFolioLayout = new javax.swing.GroupLayout(pnlBuscarFolio);
        pnlBuscarFolio.setLayout(pnlBuscarFolioLayout);
        pnlBuscarFolioLayout.setHorizontalGroup(
            pnlBuscarFolioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlBuscarFolioLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel31)
                .addGap(18, 18, 18)
                .addGroup(pnlBuscarFolioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(txtBuscarFolioCDP)
                    .addComponent(btnBuscarFolioCDP, javax.swing.GroupLayout.DEFAULT_SIZE, 100, Short.MAX_VALUE))
                .addContainerGap(47, Short.MAX_VALUE))
        );
        pnlBuscarFolioLayout.setVerticalGroup(
            pnlBuscarFolioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlBuscarFolioLayout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(pnlBuscarFolioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel31)
                    .addComponent(txtBuscarFolioCDP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnBuscarFolioCDP)
                .addContainerGap())
        );

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(btnMnuPrincipalEliCDP, javax.swing.GroupLayout.PREFERRED_SIZE, 147, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                        .addGap(0, 122, Short.MAX_VALUE)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(pnlBuscarFolio, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(chkBuscarFolioCDP))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(pnlBuscarNumero, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(chkBuscarNumeroCDP, javax.swing.GroupLayout.PREFERRED_SIZE, 172, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(141, 141, 141))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                        .addComponent(pnlDatosPersoGara, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addContainerGap())))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(chkBuscarNumeroCDP)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(pnlBuscarNumero, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(chkBuscarFolioCDP)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(pnlBuscarFolio, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(18, 18, 18)
                .addComponent(pnlDatosPersoGara, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(119, 119, 119)
                .addComponent(btnMnuPrincipalEliCDP)
                .addContainerGap(76, Short.MAX_VALUE))
        );

        jTabbedPane1.addTab("INFO. GARANTE", jPanel1);

        pnlDescripGarantia.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "DESCRIPCIÓN GARANTIA", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        txtDescripcionCDP.setBackground(new java.awt.Color(255, 255, 102));
        txtDescripcionCDP.setColumns(20);
        txtDescripcionCDP.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        txtDescripcionCDP.setRows(5);
        txtDescripcionCDP.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtDescripcionCDP.setEnabled(false);
        jScrollPane4.setViewportView(txtDescripcionCDP);

        lblDescripcion.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        lblDescripcion.setText("DESCRIPCIÓN");

        javax.swing.GroupLayout pnlDescripGarantiaLayout = new javax.swing.GroupLayout(pnlDescripGarantia);
        pnlDescripGarantia.setLayout(pnlDescripGarantiaLayout);
        pnlDescripGarantiaLayout.setHorizontalGroup(
            pnlDescripGarantiaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlDescripGarantiaLayout.createSequentialGroup()
                .addGap(70, 70, 70)
                .addComponent(lblDescripcion)
                .addGap(18, 18, 18)
                .addComponent(jScrollPane4, javax.swing.GroupLayout.DEFAULT_SIZE, 592, Short.MAX_VALUE)
                .addContainerGap())
        );
        pnlDescripGarantiaLayout.setVerticalGroup(
            pnlDescripGarantiaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlDescripGarantiaLayout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(pnlDescripGarantiaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lblDescripcion)
                    .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 89, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(367, 367, 367))
        );

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(pnlDescripGarantia, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(pnlDescripGarantia, javax.swing.GroupLayout.PREFERRED_SIZE, 359, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(106, Short.MAX_VALUE))
        );

        jTabbedPane1.addTab("DESCRIP. GARANTÍA", jPanel2);

        jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "CREACIÓN GARANTÍA CDP", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        jLabel4.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel4.setText("SUCURSAL");

        jLabel5.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel5.setText("FECHA CREACIÓN");

        jLabel6.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel6.setText("FECHA ÚLT. DEBITO");

        jLabel13.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel13.setText("FECHA MODIFICA.");

        jLabel12.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel12.setText("FECHA ÚLT. TASACIÓN");

        jLabel11.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel11.setText("MONEDA");

        txtFechUltTasaCDP.setBackground(new java.awt.Color(255, 255, 102));
        txtFechUltTasaCDP.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtFechUltTasaCDP.setEnabled(false);

        txtFechModCDP.setBackground(new java.awt.Color(255, 255, 102));
        txtFechModCDP.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtFechModCDP.setEnabled(false);

        txtMonedaCDP.setBackground(new java.awt.Color(255, 255, 102));
        txtMonedaCDP.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtMonedaCDP.setEnabled(false);

        txtFechUltDebCDP.setBackground(new java.awt.Color(255, 255, 102));
        txtFechUltDebCDP.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtFechUltDebCDP.setEnabled(false);

        txtFechCreaCDP.setBackground(new java.awt.Color(255, 255, 102));
        txtFechCreaCDP.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtFechCreaCDP.setEnabled(false);

        txtSucCDP.setBackground(new java.awt.Color(255, 255, 102));
        txtSucCDP.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtSucCDP.setEnabled(false);

        jLabel14.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel14.setText("NUMERO CDP");

        txtEliminacionNumeroCD.setBackground(new java.awt.Color(255, 255, 102));
        txtEliminacionNumeroCD.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtEliminacionNumeroCD.setEnabled(false);

        javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
        jPanel5.setLayout(jPanel5Layout);
        jPanel5Layout.setHorizontalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(jPanel5Layout.createSequentialGroup()
                        .addComponent(jLabel4)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(txtSucCDP, javax.swing.GroupLayout.PREFERRED_SIZE, 158, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel5Layout.createSequentialGroup()
                        .addComponent(jLabel5)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(txtFechCreaCDP, javax.swing.GroupLayout.PREFERRED_SIZE, 158, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel5Layout.createSequentialGroup()
                        .addComponent(jLabel6)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 39, Short.MAX_VALUE)
                        .addComponent(txtFechUltDebCDP, javax.swing.GroupLayout.PREFERRED_SIZE, 158, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel5Layout.createSequentialGroup()
                        .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel12)
                            .addComponent(jLabel13)
                            .addComponent(jLabel11)
                            .addComponent(jLabel14))
                        .addGap(18, 18, Short.MAX_VALUE)
                        .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addComponent(txtFechUltTasaCDP, javax.swing.GroupLayout.DEFAULT_SIZE, 158, Short.MAX_VALUE)
                            .addComponent(txtFechModCDP, javax.swing.GroupLayout.DEFAULT_SIZE, 158, Short.MAX_VALUE)
                            .addComponent(txtMonedaCDP, javax.swing.GroupLayout.DEFAULT_SIZE, 158, Short.MAX_VALUE)
                            .addComponent(txtEliminacionNumeroCD))))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel5Layout.setVerticalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel4)
                    .addComponent(txtSucCDP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel5)
                    .addComponent(txtFechCreaCDP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel6)
                    .addComponent(txtFechUltDebCDP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel11)
                    .addComponent(txtMonedaCDP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel12)
                    .addComponent(txtFechUltTasaCDP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel13)
                    .addComponent(txtFechModCDP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(txtEliminacionNumeroCD, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel14))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jLabel7.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel7.setText("TIPO GARANTÍA");

        jLabel8.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel8.setText("FECHA EXTINCIÓN");

        jLabel9.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel9.setText("FECHA ÚLT. REVAL.");

        jLabel10.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel10.setText("FECHA ÚLT. CRÉDITO");

        txtFechExtCDP.setBackground(new java.awt.Color(255, 255, 102));
        txtFechExtCDP.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtFechExtCDP.setEnabled(false);

        txtTipoGtiaCDP.setBackground(new java.awt.Color(255, 255, 102));
        txtTipoGtiaCDP.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtTipoGtiaCDP.setEnabled(false);

        txtFechUltRevalCDP.setBackground(new java.awt.Color(255, 255, 102));
        txtFechUltRevalCDP.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtFechUltRevalCDP.setEnabled(false);

        txtFechUltCCDP.setBackground(new java.awt.Color(255, 255, 102));
        txtFechUltCCDP.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtFechUltCCDP.setEnabled(false);

        javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
        jPanel6.setLayout(jPanel6Layout);
        jPanel6Layout.setHorizontalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel10)
                    .addComponent(jLabel9)
                    .addComponent(jLabel8)
                    .addComponent(jLabel7))
                .addGap(18, 18, 18)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(txtTipoGtiaCDP)
                    .addComponent(txtFechExtCDP)
                    .addComponent(txtFechUltRevalCDP)
                    .addComponent(txtFechUltCCDP))
                .addContainerGap())
        );
        jPanel6Layout.setVerticalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel7)
                    .addComponent(txtTipoGtiaCDP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel8)
                    .addComponent(txtFechExtCDP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel9)
                    .addComponent(txtFechUltRevalCDP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel10)
                    .addComponent(txtFechUltCCDP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(17, Short.MAX_VALUE))
        );

        jPanel12.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "ADJUNTAR ARCHIVO", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        lblArchivo.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        lblArchivo.setText("VER");

        btnVerArchivCDP.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        btnVerArchivCDP.setText("VER ARCHIVO");
        btnVerArchivCDP.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnVerArchivCDPActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel12Layout = new javax.swing.GroupLayout(jPanel12);
        jPanel12.setLayout(jPanel12Layout);
        jPanel12Layout.setHorizontalGroup(
            jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel12Layout.createSequentialGroup()
                .addGap(67, 67, 67)
                .addComponent(lblArchivo)
                .addGap(18, 18, 18)
                .addComponent(btnVerArchivCDP)
                .addContainerGap(72, Short.MAX_VALUE))
        );
        jPanel12Layout.setVerticalGroup(
            jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel12Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblArchivo)
                    .addComponent(btnVerArchivCDP))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 124, Short.MAX_VALUE)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jPanel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel12, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(jPanel4Layout.createSequentialGroup()
                        .addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jPanel12, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(128, Short.MAX_VALUE))
        );

        btnMenuPCDP.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        btnMenuPCDP.setText("MENÚ PRINCIPAL >>");
        btnMenuPCDP.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnMenuPCDPActionPerformed(evt);
            }
        });

        btnEliminarCDP.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        btnEliminarCDP.setText("ELIMINAR");
        btnEliminarCDP.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnEliminarCDPActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addContainerGap(377, Short.MAX_VALUE)
                        .addComponent(btnEliminarCDP)
                        .addGap(327, 327, 327))
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addGroup(jPanel3Layout.createSequentialGroup()
                                .addGap(0, 0, Short.MAX_VALUE)
                                .addComponent(btnMenuPCDP, javax.swing.GroupLayout.PREFERRED_SIZE, 163, javax.swing.GroupLayout.PREFERRED_SIZE)))))
                .addContainerGap())
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnMenuPCDP)
                    .addComponent(btnEliminarCDP))
                .addContainerGap(65, Short.MAX_VALUE))
        );

        jTabbedPane1.addTab("ELIMINACIÓN GARANTÍA CDP", jPanel3);

        jPanel9.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "ÁREA IMPRESIÓN", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        tbSalidaImprimirCdp.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {

            }
        ));
        tbSalidaImprimirCdp.setEnabled(false);
        jScrollPane1.setViewportView(tbSalidaImprimirCdp);

        javax.swing.GroupLayout jPanel9Layout = new javax.swing.GroupLayout(jPanel9);
        jPanel9.setLayout(jPanel9Layout);
        jPanel9Layout.setHorizontalGroup(
            jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel9Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane1)
                .addContainerGap())
        );
        jPanel9Layout.setVerticalGroup(
            jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel9Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 286, Short.MAX_VALUE)
                .addContainerGap())
        );

        btnImprimirCdp.setText("IMPRIMIR");
        btnImprimirCdp.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnImprimirCdpActionPerformed(evt);
            }
        });

        btnMenuPrincipalCdp.setText("MENÚ PRINCIPAL");
        btnMenuPrincipalCdp.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnMenuPrincipalCdpActionPerformed(evt);
            }
        });

        jPanel10.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "INGRESE NÚMERO CDP", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        txtBuscarCdpImprimirEliminar.setCursor(new java.awt.Cursor(java.awt.Cursor.TEXT_CURSOR));

        btnBuscarCdpEliminacionImprimir.setText("BUSCAR");
        btnBuscarCdpEliminacionImprimir.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnBuscarCdpEliminacionImprimirActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel10Layout = new javax.swing.GroupLayout(jPanel10);
        jPanel10.setLayout(jPanel10Layout);
        jPanel10Layout.setHorizontalGroup(
            jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel10Layout.createSequentialGroup()
                .addGap(33, 33, 33)
                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(txtBuscarCdpImprimirEliminar)
                    .addComponent(btnBuscarCdpEliminacionImprimir, javax.swing.GroupLayout.DEFAULT_SIZE, 133, Short.MAX_VALUE))
                .addContainerGap(30, Short.MAX_VALUE))
        );
        jPanel10Layout.setVerticalGroup(
            jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel10Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(txtBuscarCdpImprimirEliminar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnBuscarCdpEliminacionImprimir)
                .addGap(5, 5, 5))
        );

        javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7);
        jPanel7.setLayout(jPanel7Layout);
        jPanel7Layout.setHorizontalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel7Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel9, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
            .addGroup(jPanel7Layout.createSequentialGroup()
                .addGap(330, 330, 330)
                .addComponent(btnImprimirCdp, javax.swing.GroupLayout.PREFERRED_SIZE, 121, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 174, Short.MAX_VALUE)
                .addComponent(btnMenuPrincipalCdp, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(26, 26, 26))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel7Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jPanel10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(315, 315, 315))
        );
        jPanel7Layout.setVerticalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel7Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnImprimirCdp)
                    .addComponent(btnMenuPrincipalCdp))
                .addContainerGap())
        );

        jTabbedPane1.addTab("IMPRIMIR", jPanel7);

        jLabel3.setText("MENÚ PRINCIPAL\\ELIMINACIÓN GARANTÍA CDP");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel2)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(118, 118, 118)
                        .addComponent(jLabel1))
                    .addGroup(layout.createSequentialGroup()
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel3)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
            .addComponent(jTabbedPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 806, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel1)
                    .addComponent(jLabel2)
                    .addComponent(jLabel3, javax.swing.GroupLayout.Alignment.TRAILING))
                .addGap(18, 18, 18)
                .addComponent(jTabbedPane1))
        );

        setSize(new java.awt.Dimension(822, 642));
        setLocationRelativeTo(null);
    }// </editor-fold>//GEN-END:initComponents

    private void btnVerArchivCDPActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnVerArchivCDPActionPerformed
         String archivo = garantia.getAdjuntar_cdp();
           if(!archivo.equals("")){  
         File file = new File(archivo);
        try {
            Desktop.getDesktop().open(file);
        } catch (IOException ex) {
            javax.swing.JOptionPane.showMessageDialog(this, "Problema al abrir archivo");
        }
           }else{
           javax.swing.JOptionPane.showMessageDialog(this, "No tiene archivo adjunto");
           } 
    }//GEN-LAST:event_btnVerArchivCDPActionPerformed

    private void btnMnuPrincipalEliCDPActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnMnuPrincipalEliCDPActionPerformed
        MenuPrincipal venMenuPrincipal = new MenuPrincipal(user);
        venMenuPrincipal.setVisible(true);
        EliminacionGarantiaCdp.this.dispose();
    }//GEN-LAST:event_btnMnuPrincipalEliCDPActionPerformed

    private void btnBuscarFolioCDPActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnBuscarFolioCDPActionPerformed
        try{
          if (!this.txtBuscarFolioCDP.getText().matches("[ 0-9]*")) // expresiones regulares para validar
        {
            javax.swing.JOptionPane.showMessageDialog(this, "Ingrese solo números");
            this.txtBuscarFolioCDP.setText("");
        }
       else{
        if(this.txtBuscarFolioCDP.getText().length() > 0)
        {
        garantia = reg.buscarPorFolioCDP(Integer.parseInt(txtBuscarFolioCDP.getText().trim()));
        if(garantia.getFolio_cdp() == 0)
        {
            javax.swing.JOptionPane.showMessageDialog(null, "Garantia NO EXISTE.");
            txtBuscarFolioCDP.setText("");
            this.btnEliminarCDP.setVisible(false);
            this.txtBuscarNumeroCDP.setText("");
            limpiar();
        }
        else
        {
            txtRutEliCDP.setText(garantia.getRut_gara_cdp());
            txtApellMatEliCDP.setText(garantia.getApell_materno_cdp());
            txtApellPatEliCDP.setText(garantia.getApell_paterno_cdp());
            txtEliNombreCDP.setText(garantia.getNombre_cdp());
//            txtNFolioGaraEliCDP.setText(String.valueOf(garantia.getFolio_cdp()));
            txtDescripcionCDP.setText(garantia.getComent_cdp());
            txtSucCDP.setText(garantia.getSucu_cdp());
            String fechaCreacion = (new SimpleDateFormat("dd/MM/yyyy").format(garantia.getFech_crea_cdp()));
            txtFechCreaCDP.setText(fechaCreacion);
            txtFechUltDebCDP.setText(garantia.getFech_ult_deb_cdp());
            txtMonedaCDP.setText(garantia.getNom_moneda_cdp());
            txtFechUltTasaCDP.setText(garantia.getFech_ult_tasa_cdp());
            txtFechModCDP.setText(garantia.getFech_modif_cdp());
            txtTipoGtiaCDP.setText(garantia.getTipo_garantia_cdp());
            String fechaVen = (new SimpleDateFormat("dd/MM/yyyy").format(garantia.getFech_extin_cdp()));
            txtFechExtCDP.setText(fechaVen);
            txtFechUltRevalCDP.setText(garantia.getFech_ult_reval_cdp());
            txtFechUltCCDP.setText(garantia.getFech_ult_cred_cdp());
            txtEliminacionNumeroCD.setText(String.valueOf(garantia.getNum_cdp()));
            this.btnEliminarCDP.setVisible(true);
            this.txtBuscarNumeroCDP.setText("");
        }
        }else
        {
            limpiar();
            this.txtBuscarNumeroCDP.setText("");
            this.btnEliminarCDP.setVisible(false);
           javax.swing.JOptionPane.showMessageDialog(this, "Ingrese Número de Folio");
        }
        }}
        catch(Exception e)
        {
            e.getMessage();
        }
    }//GEN-LAST:event_btnBuscarFolioCDPActionPerformed

    private void btnBuscarNumeroCDPActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnBuscarNumeroCDPActionPerformed
        try
        {
            if (!this.txtBuscarNumeroCDP.getText().matches("[ 0-9]*")) // expresiones regulares para validar
        {
            javax.swing.JOptionPane.showMessageDialog(this, "Ingrese solo números");
            this.txtBuscarNumeroCDP.setText("");
        }
       else{
        if(this.txtBuscarNumeroCDP.getText().length() > 0)
        {
        garantia = reg.buscarPorNum(Integer.parseInt(txtBuscarNumeroCDP.getText().trim()));
        if(garantia.getFolio_cdp() == 0)
        {
            javax.swing.JOptionPane.showMessageDialog(null, "Garantia NO EXISTE.");
            txtBuscarNumeroCDP.setText("");
            this.btnEliminarCDP.setVisible(false);
            this.txtBuscarFolioCDP.setText("");
            limpiar();
        }
        else
        {
            txtRutEliCDP.setText(garantia.getRut_gara_cdp());
            txtApellMatEliCDP.setText(garantia.getApell_materno_cdp());
            txtApellPatEliCDP.setText(garantia.getApell_paterno_cdp());
            txtEliNombreCDP.setText(garantia.getNombre_cdp());
//            txtNFolioGaraEliCDP.setText(String.valueOf(garantia.getFolio_cdp()));
            txtDescripcionCDP.setText(garantia.getComent_cdp());
            txtSucCDP.setText(garantia.getSucu_cdp());
            String fechaCreacion = (new SimpleDateFormat("dd/MM/yyyy").format(garantia.getFech_crea_cdp()));
            txtFechCreaCDP.setText(fechaCreacion);
            txtFechUltDebCDP.setText(garantia.getFech_ult_deb_cdp());
            txtMonedaCDP.setText(garantia.getNom_moneda_cdp());
            txtFechUltTasaCDP.setText(garantia.getFech_ult_tasa_cdp());
            txtFechModCDP.setText(garantia.getFech_modif_cdp());
            txtTipoGtiaCDP.setText(garantia.getTipo_garantia_cdp());
            String fechaVen = (new SimpleDateFormat("dd/MM/yyyy").format(garantia.getFech_extin_cdp()));
            txtFechExtCDP.setText(fechaVen);
            txtFechUltRevalCDP.setText(garantia.getFech_ult_reval_cdp());
            txtFechUltCCDP.setText(garantia.getFech_ult_cred_cdp());
            txtEliminacionNumeroCD.setText(String.valueOf(garantia.getNum_cdp()));
            this.btnEliminarCDP.setVisible(true);
            this.txtBuscarFolioCDP.setText("");
        }
        }
        else
        {
            limpiar();
            this.txtBuscarFolioCDP.setText("");
            this.btnEliminarCDP.setVisible(false);
           javax.swing.JOptionPane.showMessageDialog(this, "Ingrese Número de CDP");
        }
        }}
        catch(Exception e)
        {
            e.getMessage();
        }
    }//GEN-LAST:event_btnBuscarNumeroCDPActionPerformed

    private void btnMenuPCDPActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnMenuPCDPActionPerformed
        MenuPrincipal venMenuPrincipal = new MenuPrincipal(user);
        venMenuPrincipal.setVisible(true);
        EliminacionGarantiaCdp.this.dispose();
    }//GEN-LAST:event_btnMenuPCDPActionPerformed

    private void btnEliminarCDPActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnEliminarCDPActionPerformed
         //Mensaje Confirmacion
        int respuesta = javax.swing.JOptionPane.showConfirmDialog(null, "Esta seguro de eliminar esta garantia ?", "Eliminacion", JOptionPane.OK_CANCEL_OPTION);
        //Si acepta
        if(respuesta == 0)
        {
            reg.eliminarGarantiaCDPPorNumeroCDP(Integer.parseInt(this.txtEliminacionNumeroCD.getText()));
            javax.swing.JOptionPane.showMessageDialog(null, "Garantia Eliminada");
            MenuPrincipal venMenuPrincipal = new MenuPrincipal(user);
            venMenuPrincipal.setVisible(true);
            EliminacionGarantiaCdp.this.dispose();
        }
        else
        {
            
        }
      
    }//GEN-LAST:event_btnEliminarCDPActionPerformed

    private void chkBuscarFolioCDPActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chkBuscarFolioCDPActionPerformed
        if (chkBuscarFolioCDP.isSelected()) {
            pnlBuscarFolio.setVisible(true);
            pnlBuscarNumero.setVisible(false);
        }
        else
        {
            pnlBuscarFolio.setVisible(false);
        }
    }//GEN-LAST:event_chkBuscarFolioCDPActionPerformed

    private void chkBuscarNumeroCDPActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chkBuscarNumeroCDPActionPerformed
        if (chkBuscarNumeroCDP.isSelected()) {
            pnlBuscarNumero.setVisible(true);
            pnlBuscarFolio.setVisible(false);
        }
        else
        {
            pnlBuscarNumero.setVisible(false);
        }
    }//GEN-LAST:event_chkBuscarNumeroCDPActionPerformed

    private void btnBuscarCdpEliminacionImprimirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnBuscarCdpEliminacionImprimirActionPerformed
       try
       {
           String fechaEliminacion = String.valueOf(Fechas.FechaSistema());
           ArrayList<garantiaCdpOtrosDTO> salida = reg.ListarPorCdp(Integer.parseInt(this.txtBuscarCdpImprimirEliminar.getText().trim()));
          
           if(salida.isEmpty())
           {
               
               this.txtBuscarCdpImprimirEliminar.setText(null);
               DefaultTableModel modelo = (DefaultTableModel)this.tbSalidaImprimirCdp.getModel();
               modelo.setNumRows(0);
               javax.swing.JOptionPane.showMessageDialog(this, "No hay garantias registradas!");
           }
           else
           {
               
               DefaultTableModel modelo = (DefaultTableModel)this.tbSalidaImprimirCdp.getModel();
               modelo.setColumnCount(0);
               
               if(modelo.getColumnCount() < 1)
                {
                    
                    Object[] arr1 ={"Rut: ","Nombre: ", "Calle: ", "Garantía: ", "Número identificatorio CDP: ",
                        "Número de folio: ", "Monto incial: ", "Creación de la garantía: ", "Sucursal: ",
                        "Fecha último debito: ","Moneda: ","Fecha última tasación","Tipo garantía: ","Fecha vencimiento: ",
                        "Fecha último revaluo: ","Fecha último credito: ","Estado de la garantía: ","Fecha aprobado/Rechazado: ",
                        "Fecha de modificación: ","Fecha de garantía eliminada: ",
                        "Usuario: " };
                    modelo.addColumn("Concepto", arr1);
                    
                    for(garantiaCdpOtrosDTO c: salida)
                {
                    Object[] arr2 ={
                                   c.getRut_gara_cdp(),
                                   c.getNombre_cdp() + "  " + c.getApell_paterno_cdp() + "  " + c.getApell_materno_cdp(),
                                   c.getCalle_cdp() + "  " + c.getNumero_calle_cdp(),
                                   c.getNom_garantia_cdp(),
                                   c.getNum_cdp(),
                                   c.getFolio_cdp(),
                                   c.getMonto_inicial(),
                                   c.getFech_crea_cdp(),
                                   c.getSucu_cdp(),
                                   c.getFech_ult_deb_cdp(),
                                   c.getNom_moneda_cdp(),
                                   c.getFech_ult_tasa_cdp(),
                                   c.getTipo_garantia_cdp(),
                                   c.getFech_extin_cdp(),
                                   c.getFech_ult_reval_cdp(),
                                   c.getFech_ult_cred_cdp(),
                                   c.getEstado_cdp(),
                                   c.getFech_crea_cdp(),
                                   c.getFech_modif_cdp(),
                                   fechaEliminacion,
                                   c.getNombre_usuario()
                    };
                     
                    modelo.addColumn("Contenido",arr2);    
                }
                    
                    Object[] arr3 = {" "," "," "," "," "," "," "," "," "," ",
                                     " "," "," "," "," "," "," "," "," "," "," "};
                    modelo.addColumn("Observaciones",arr3);
                    
                }
    
           }
       }
       
       catch(Exception e)
       {
           e.getMessage();
       }
    }//GEN-LAST:event_btnBuscarCdpEliminacionImprimirActionPerformed

    private void btnImprimirCdpActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnImprimirCdpActionPerformed
       try {
            
        int fila= 0;
  
        List Resultados = new ArrayList();
        ComprobanteGeneralDTO tipo;
        Resultados.clear();
        
        for(fila = 0; fila< tbSalidaImprimirCdp.getRowCount(); fila++)
        {
            
           tipo = new ComprobanteGeneralDTO(String.valueOf(tbSalidaImprimirCdp.getValueAt(fila, 0)),
                    " " + String.valueOf(tbSalidaImprimirCdp.getValueAt(fila, 1)), " " + String.valueOf(tbSalidaImprimirCdp.getValueAt(fila, 2))  + "\n");
           Resultados.add(tipo);

        }
        
            String reportSource = "C:\\Users\\SoftGroup\\Documents\\NetBeansProjects\\trunk\\AppGarantias\\build\\classes\\Reporte\\ComprobanteGeneralGarantias.jrxml";

            JasperReport jr = JasperCompileManager.compileReport(reportSource);
            
            
            JFrame reporte = new JFrame();
            reporte.setSize(900, 700);
            reporte.setLocationRelativeTo(null);
            reporte.setTitle("IMPRESIÓN");
            String fechaImpresion = String.valueOf(Fechas.FechaSistema());
            
            Map<String, Object> map = new HashMap<String, Object>();
            
            map.put("Titulo", "Sistema Gestión de Garantías Bancarias");
            map.put("fecha", fechaImpresion);
            map.put("nombreBanco", "Banco xxxxxx");
            map.put("subtitulo", "Comprobante Eliminación CDP");
            map.put("timbre", "Timbre");
            map.put("fechaUsuario","Fecha");
            map.put("firma","Firma");
            
            
            JRBeanCollectionDataSource coleccion = new JRBeanCollectionDataSource(Resultados);
            JasperPrint jp = JasperFillManager.fillReport(jr, map, coleccion);
            JRViewer jv = new JRViewer(jp);
            reporte.getContentPane().add(jv);
            reporte.setVisible(true);
            
            
            
        } catch (JRException e) {
            e.printStackTrace();
            Logger.getLogger(EliminacionGarantiaCdp.class.getName()).log(Level.SEVERE, null, e);
        }
    }//GEN-LAST:event_btnImprimirCdpActionPerformed

    private void btnMenuPrincipalCdpActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnMenuPrincipalCdpActionPerformed
          MenuPrincipal venMenuPrincipal = new MenuPrincipal(user);
        venMenuPrincipal.setVisible(true);
        EliminacionGarantiaCdp.this.dispose();
    }//GEN-LAST:event_btnMenuPrincipalCdpActionPerformed

    /**
     * @param args the command line arguments
     */
//    public static void main(String args[]) {
//        /*
//         * Set the Nimbus look and feel
//         */
//        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
//        /*
//         * If Nimbus (introduced in Java SE 6) is not available, stay with the
//         * default look and feel. For details see
//         * http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
//         */
//        try {
//            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
//                if ("Nimbus".equals(info.getName())) {
//                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
//                    break;
//                }
//            }
//        } catch (ClassNotFoundException ex) {
//            java.util.logging.Logger.getLogger(EliminacionGarantiaCdp.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
//        } catch (InstantiationException ex) {
//            java.util.logging.Logger.getLogger(EliminacionGarantiaCdp.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
//        } catch (IllegalAccessException ex) {
//            java.util.logging.Logger.getLogger(EliminacionGarantiaCdp.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
//        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
//            java.util.logging.Logger.getLogger(EliminacionGarantiaCdp.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
//        }
//        //</editor-fold>
//
//        /*
//         * Create and display the form
//         */
//        java.awt.EventQueue.invokeLater(new Runnable() {
//
//            public void run() {
//                new EliminacionGarantiaCdp().setVisible(true);
//            }
//        });
//    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnBuscarCdpEliminacionImprimir;
    private javax.swing.JButton btnBuscarFolioCDP;
    private javax.swing.JButton btnBuscarNumeroCDP;
    private javax.swing.JButton btnEliminarCDP;
    private javax.swing.JButton btnImprimirCdp;
    private javax.swing.JButton btnMenuPCDP;
    private javax.swing.JButton btnMenuPrincipalCdp;
    private javax.swing.JButton btnMnuPrincipalEliCDP;
    private javax.swing.JButton btnVerArchivCDP;
    private javax.swing.ButtonGroup buttonGroup1;
    private javax.swing.JCheckBox chkBuscarFolioCDP;
    private javax.swing.JCheckBox chkBuscarNumeroCDP;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel30;
    private javax.swing.JLabel jLabel31;
    private javax.swing.JLabel jLabel36;
    private javax.swing.JLabel jLabel37;
    private javax.swing.JLabel jLabel39;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel40;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel10;
    private javax.swing.JPanel jPanel12;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JPanel jPanel6;
    private javax.swing.JPanel jPanel7;
    private javax.swing.JPanel jPanel8;
    private javax.swing.JPanel jPanel9;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane4;
    private javax.swing.JTabbedPane jTabbedPane1;
    private javax.swing.JLabel lblArchivo;
    private javax.swing.JLabel lblDescripcion;
    private javax.swing.JPanel pnlBuscarFolio;
    private javax.swing.JPanel pnlBuscarNumero;
    private javax.swing.JPanel pnlDatosPersoGara;
    private javax.swing.JPanel pnlDescripGarantia;
    private javax.swing.JTable tbSalidaImprimirCdp;
    private javax.swing.JTextField txtApellMatEliCDP;
    private javax.swing.JTextField txtApellPatEliCDP;
    private javax.swing.JTextField txtBuscarCdpImprimirEliminar;
    private javax.swing.JTextField txtBuscarFolioCDP;
    private javax.swing.JTextField txtBuscarNumeroCDP;
    private javax.swing.JTextArea txtDescripcionCDP;
    private javax.swing.JTextField txtEliNombreCDP;
    private javax.swing.JTextField txtEliminacionNumeroCD;
    private javax.swing.JTextField txtFechCreaCDP;
    private javax.swing.JTextField txtFechExtCDP;
    private javax.swing.JTextField txtFechModCDP;
    private javax.swing.JTextField txtFechUltCCDP;
    private javax.swing.JTextField txtFechUltDebCDP;
    private javax.swing.JTextField txtFechUltRevalCDP;
    private javax.swing.JTextField txtFechUltTasaCDP;
    private javax.swing.JTextField txtMonedaCDP;
    private javax.swing.JTextField txtRutEliCDP;
    private javax.swing.JTextField txtSucCDP;
    private javax.swing.JTextField txtTipoGtiaCDP;
    // End of variables declaration//GEN-END:variables

    private void limpiar() {
            txtRutEliCDP.setText(null);
            txtApellMatEliCDP.setText(null);
            txtApellPatEliCDP.setText(null);
            txtEliNombreCDP.setText(null);
            txtEliminacionNumeroCD.setText(null);
            txtDescripcionCDP.setText(null);
            txtSucCDP.setText(null);
            txtFechCreaCDP.setText(null);
            txtFechUltDebCDP.setText(null);
            txtMonedaCDP.setText(null);
            txtFechUltTasaCDP.setText(null);
            txtFechModCDP.setText(null);
            txtTipoGtiaCDP.setText(null);
            txtFechExtCDP.setText(null);
            txtFechUltRevalCDP.setText(null);
            txtFechUltCCDP.setText(null);
    }
}
